<?php

use yii\helpers\Url;

$tab_list = [
    'index' => [
        'title' => '会员列表',
        'url' => '/admin/member/index',
    ],
    'set' => [
        'title' => '创建会员',
        'url' => '/admin/member/set',
    ],
];
?>
<form class="member_search">
  <div class=" ui inverted segment">
    <div class=" ui inverted secondary pointing menu">
      <?php foreach ($tab_list as $key => $item): ?>
      <a class="item <?php if ($tab == $key): ?>active<?php endif;?> " href="<?=Url::to([$item['url']])?>">
        <?=$item['title']?> </a>
      <?php endforeach;?>
      <?php if ($tab == 'index'): ?>
      <div class="ui icon input" style="margin: 0 auto;">
        <input type="text" placeholder="会员姓名......" name="mx_kw">
        <i class="search link icon"></i>
      </div>
      <?php endif;?>
    </div>
  </div>
</form>